import { BaseEntity } from "src/baseEntity";
import { System } from "src/system/system.entity";
import { UserSys } from "src/user/userSys.entity";
import { Column, Entity, ManyToOne } from "typeorm";



@Entity("salary")
export class Salary extends BaseEntity {
    @ManyToOne(() => System)
    system: System

    @ManyToOne(() => UserSys)
    user: UserSys

    @Column({
        comment: "发放单位",
        nullable:true
    })
    union: string

    @Column({
        comment: "出勤天数",
        nullable:true
    })
    attendance: number

    @Column({
        comment: "分数",
        nullable:true
    })
    score: number

    @Column({
        comment: "基本工资",
        nullable:true
    })
    baseSalary: number

    @Column({
        comment: "奖金",
        nullable:true
    })
    bonus: number

    @Column({
        comment: "工龄",
        nullable:true
    })
    seniority: string

    @Column({
        comment: "缺卡",
        nullable:true
    })
    lack: string

    @Column({
        comment: "个税缴纳",
        nullable:true
    })
    tax: number

    @Column({
        comment: "违规扣除",
        nullable:true
    })
    deduction: number

    @Column({
        comment: "保险扣除",
        nullable:true
    })
    insurance: number

    @Column({
        comment: "宿舍扣除",
        nullable:true
    })
    dorm: number

    @Column({
        comment: "实发金额",
        nullable:true
    })
    salary: number

    @Column({
        comment: "备注",
        nullable: true
    })
    comment: string

    @Column({
        type: "timestamp",
        comment: "发放日期",
        nullable: true
    })
    publish: Date
}